package com.example.shoppingmall.service;

import com.example.shoppingmall.pojo.Parameter;
import com.example.shoppingmall.dao.ParameterMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ParameterService {
    @Autowired
    private ParameterMapper parameterMapper;

    public List<Parameter> parameterList(){
        return parameterMapper.parameterList();
    }

    public List<Parameter>parameterListForNo(@Param("no")int no){
        return parameterMapper.parameterListForNo(no);
    }

    public int count(){
        return parameterMapper.count();
    }

    public Parameter xiangQing(@Param("id")int id){
        return parameterMapper.xiangQing(id);
    }

    public int add(@Param("name")String name){
        return parameterMapper.add(name);
    }

    public int delete(@Param("id")int id){
        return parameterMapper.delete(id);
    }

    public int update(Parameter parameter){
        return parameterMapper.update(parameter);
    }

    public int chackName(@Param("name")String name){
        return parameterMapper.chackName(name);
    }
}
